import request from '@/utils/request'

// 查询设备库存表列表
export function listEquipemnt(query) {
  return request({
    url: '/hospital/equipemnt/list',
    method: 'get',
    params: query
  })
}


export function listEquipemntYan(query) {
  return request({
    url: '/hospital/equipemnt/showAll',
    method: 'get',
    params: query
  })
}

// 查询设备库存表详细
export function getEquipemnt(equipmentId) {
  return request({
    url: '/hospital/equipemnt/' + equipmentId,
    method: 'get'
  })
}


export function getEquipemntByIdYan(equipmentId) {
  return request({
    url: '/hospital/equipemnt/yan/' + equipmentId,
    method: 'get'
  })
}

// 新增设备库存表
export function addEquipemnt(data) {
  return request({
    url: '/hospital/equipemnt',
    method: 'post',
    data: data
  })
}

export function addEquipemntYan(data) {
  return request({
    url: '/hospital/equipemnt/addEquipemntYan',
    method: 'post',
    data: data
  })
}
export function getEquipemntTypeYan() {
  return request({
    url: '/hospital/equipemnt/getEquipemntTypeYan',
    method: 'get',
  })
}
// 修改设备库存表
export function updateEquipemnt(data) {
  return request({
    url: '/hospital/equipemnt',
    method: 'put',
    data: data
  })
}

export function updateEquipemntYan(data) {
  return request({
    url: '/hospital/equipemnt/updateEquipemntYan',
    method: 'put',
    data: data
  })
}

// 删除设备库存表
export function delEquipemnt(equipmentId) {
  return request({
    url: '/hospital/equipemnt/' + equipmentId,
    method: 'delete'
  })
}
